
const cycleList = [{
    id: 1,
    name: '每月'
}, {
    id: 2,
    name: '每周'
}, {
    id: 3,
    name: '每日'
}, {
    id: 4,
    name: '工作日'
}]

const cycleMap = cycleList.reduce((obj, item) => {
    return {
        ...obj,
        [item.id]: item.name,
        [item.name]: item.id
    }
}, {})

const billTypes = [{
    id: 0,
    name: '支出'
}, {
    id: 1,
    name: '收入'
}, {
    id: 2,
    name: '不计收支'
}]


const billTypeMap = billTypes.reduce((obj, item) => {
    return {
        ...obj,
        [item.id]: item.name,
        [item.name]: item.id
    }
}, {})

const enableStatus = [{
    id: 0,
    name: '停用'
}, {
    id: 1,
    name: '启用'
}]


const enableStatusMap = enableStatus.reduce((obj, item) => {
    return {
        ...obj,
        [item.id]: item.name,
        [item.name]: item.id
    }
}, {})

export { cycleList, cycleMap, billTypes, billTypeMap, enableStatus, enableStatusMap }